package org.fude.util;

import java.util.List;

import org.springframework.util.StringUtils;

public class StringBufferUtil {

	private static final StringBuffer sb = new StringBuffer();
	
	
	public static String append(String[] array) {
		clearStringBuffer();
		for(String value : array) {
			if(!StringUtils.hasText(value)) {
				return "";
			}
			sb.append(value);
		}
		return sb.toString();
	}
	public static String append(List<String> list) {
		
		return append(list.toArray(new String[0]));
	}
	
	
	
	public static void clearStringBuffer() {
		sb.setLength(0);
	}
}
